<%--
 * list.jsp
 *
 * Copyright (C) 2013 Universidad de Sevilla
 * 
 * The use of this project is hereby constrained to the conditions of the 
 * TDG Licence, a copy of which you may download from 
 * http://www.tdg-seville.info/License.html
 --%>

<%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>

<%@taglib prefix="jstl"	uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="security" uri="http://www.springframework.org/security/tags"%>
<%@taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@taglib prefix="acme" tagdir="/WEB-INF/tags" %>


<display:table pagesize="5" class="displaytag" 
name="customers" requestURI="/customer/list.do" id="row">
	
	<!-- Attributes -->
	
	<spring:message code="customer.name" var="nameHeader" />
	<display:column property="name" title="${titleHeader}" sortable="true" />
	
	<spring:message code="customer.surnames" var="surnamesHeader" />
	<display:column property="surnames" title="${surnamesHeader}" sortable="true"/>
	
	<spring:message code="customer.galleries" var="galleries"/>
	<display:column title="${galleries}" sortable="false">
			<input type="button" name="galleries"
				value="${galleries}"
				onclick="javascript: window.location.replace('gallery/list.do?customerId=${row.id}')" />
	</display:column>
	
	<spring:message code="customer.paintings" var="paintings"/>
	<display:column title="${paintings}" sortable="false">
			<input type="button" name="paintings"
				value="${paintings}"
				onclick="javascript: window.location.replace('painting/listOwned.do?ownerId=${row.id}')" />
	</display:column>
	
</display:table>